<style scoped>
  .expand-row{
    margin-bottom: 16px;
  }
</style>
<template>
  <div>
    <Row class="expand-row">
      <Col span="8">
        <span class="expand-key">货物名称: </span>
        <span class="expand-value">{{ row.goodsName }}</span>
      </Col>
      <Col span="8">
        <span class="expand-key">材质: </span>
        <span class="expand-value">{{ row.material }}</span>
      </Col>
      <Col span="8">
        <span class="expand-key">规格: </span>
        <span class="expand-value">{{ row.specification }}</span>
      </Col>
    </Row>
    <Row class="expand-row">
      <Col span="8">
        <span class="expand-key">供应商: </span>
        <span class="expand-value">{{ row.supplier }}</span>
      </Col>
      <Col span="8">
        <span class="expand-key">货物类型: </span>
        <span class="expand-value">{{ row.goodsType }}</span>
      </Col>
      <Col span="8">
        <span class="expand-key">当前库存数量: </span>
        <span class="expand-value">{{ row.number }}</span>
      </Col>
    </Row>
    <Row>
      <Col span="8">
        <span class="expand-key">单价: </span>
        <span class="expand-value">{{ row.price }}</span>
      </Col>
      <Col span="8">
        <span class="expand-key">摘要: </span>
        <span class="expand-value">{{ row.summary }}</span>
      </Col>
    </Row>
  </div>
</template>
<script>
  import {toGet} from "../../utils/MyAxios";
  export default {
    data(){
      return{
        row:{
          goodsName:'',
          material:'',
          specification:'',
          supplier:'',
          goodsType:'',
          number:'',
          price:'',
          summary:'',
        }
      }
    },
    props: ['id'],
    mounted(){
      toGet('/finance-management/finance/goods/queryOne/'+this.id)
        .then(res=>{
          if (res.resultCode === 0) {
            this.row=res.data;
          }
        });
    }
  };
</script>
